Auto Stop
A simple script using the last three bars(including the current) and draws a line on the chart under that for an easy automated stop loss point
Komut dosyalarını "stop loss" için ara
Anti-Volume Stop Loss multi timeframe [LM]Hello Traders,
I would like to introduce you fork of popular indicator Anti-Volume Stop Loss created by Buff Dormeier and cracked here on tradingview by @Rafka so shout out to him. I have tried to crack it myself as well as I'm big fan of Dormeier's work but it's not easy so really big thanks to Rafka
I have refactored original script and have included multi timeframe setting.
As its shown below you can select higher timeframe to track lower one:
Enjoy!
Bitlinc MARSI Study AST w/ Take Profit & Stop loss - beta 0.1This script is beta 0.1 - will update as soon as the script is tradable
This script is based on AST on a 10 minute timeframe. You can change the asset and the timeframe for any asset you want to trade, but for it to work correct ALL settings have to be testes in the Strategy section of the TradingView. Each assets and timeframe require a different mixture of settings. This is NOT a one settings fits all trading for all assets on any timeframe. Below are the settings and explanation on how it works.
How it fires a buy / sell:
The script will plot an RSI with upper and lower bands in a separate indicator window. The idea behind this script is to fire a LONG when MA crosses OVER lower band and fire a SHORT when the MA crosses under the lower band. Each order that fires is an OCO (Order Cancels Order) for pyramiding.
Settings:
You have full control of these settings as mentioned above, you must configure every part of this script for each asset and timeframe you trade.
- Length of MA
- Length
- Upper bands of RSI
- Lower bands of RSI
- Take profit percentage
- Stop loss percentage
- Month to start and end the strategy (within 2020)
- Day to start and end the strategy (within 2020)
- Quantity type
- Slippage
- Pyramiding
***Remember that after the signal to enter or exit a trade is fired, the alert will trigger AFTER the close of the candle that caused the tigger to fire
ATR with Take and StopThis simple indicator will plot the take profit and stop loss values based on the ATR indicator.
It's possible to set how many times the ATR value will be applied to the closing price and
what trade type is used, Long or Short.
ATR Stop Loss LONG/SHORT by melihgulerYou can monitor the stop loss level according to ATR in 2 ways (Long/Short).
Moving Stop Loss (Most) by ceyhunATR is an indicator that has been removed and replaced with a moving average.Bar colors and infopanel have been added.
//Barcolor
Green = ExMov > Most and close > Most and low > Most
Blue = ExMov > Most and close > Most and low < Most
Red = Most > ExMov and close < Most and high < Most
Yellow = Most > ExMov and close < Most and high > Most
//It gives White color where there is deterioration.
//InfoPanel
Buy Price = Blue draws the circles at the purchase price.
Profit Long>20 = Risk level taken as a percentage, I got the highest 20%, you can determine as you wish.
Sell Price = Red draws the circles at the purchase price.
Profit Short>20 = Risk level taken as a percentage, I got the highest 20%, you can determine as you wish.
==Atr Original Code==
CDC ATR Trailing Stop V2.1 (2013)
==Most Code==
MOST by Anıl ÖZEKŞİ
Barcolor
Barcolor
RSI + EMA+ MTF Stop-LossThis is a simple RSI with multiple MTF (No security) to help with direction short and long-term.
The rsi for the current chart has a noise reduction, while the rest are based on ma's.
I have supplied an extra flexible mtf rsi ma for potential adjustable/long-term stop-loss or direction identification.
Enjoy
RSI Stop LossExperiment for using RSI as a stop loss value, shows where the price will be when the RSI increases or decreases by a specified amount.
ATR Pips with Stop LossThis indicator shares ATR pips and a calculated 1.5 x stop loss calculation.
1st number is ATR.
2nd number is ATR x 1.5 (a typical SL when trading daily time frame).
The plot lines are really not that important- it's the actual numbers.
What I do is uncheck the plot line checkboxes (ATR & SL) so it doesn't show up, that way I can reduce the indicator window.
This script is a modified script by ATR Pips . Kept the BB section for now as it might be useful, but doubt it.
Future updates:
- editable the multiple for SL
- static daily numbers (right now this shows the timeframe you are viewing, I'd keep that but add a static daily ATR so you have both)
poki buy and sell Take profit and stop lossThis indicator is based on modelius model of lazy bear weis model with ATR for the buy=B sell =S
in addition there is Take profit and stop loss in % both for short and for long
next stage is to know the resistance level and support based on bollinger marked in blue and red dots
Also included Parabolic Sar (blue and red dots rising up or down)
The color of bulish or bearish zone is based on the cross of Hull avreage and linear regression ( for each time set may need different setting for accuracy )
So how to use this scrupt to better profit
1. if you have B signal and its on lower support level then its good starting place for buy. look at the Parabolic Sar if its in agreement. The exit can be either by S =sell, Take profit that you decide on % or by end of Parabolic SAR upward
2. exact the oposite for short
Play with setting for the desired results or change modify this script for your purpose
Pivot Stop LossHere we intend to use pivot points for stop loss and take profit. This has the added benefit of helping you to visualize support and resistance levels.
ATR Stop Loss VisualizerThis will help you figure out what stop loss settings work best for you. Some people might prefer ATR 14 * 0.5 for shorter timeframes, some might prefer more extreme settings such as ATR 30 * 2 to not get stopped out as often.
Hull modelius take profit and stop lossThis model has Hull moving average, fibs in form of Bollinger ,SMA and Modelius model with ATR for buy and sell power based on weis volume. Inside alerts for buy and sell. take profit and stop loss for both longs and shorts
so have fun
STOP-LOSS-RSI with Edge-Preserving Filter Strategy V2Modified RSI strategy with entry and exit points.
I have allowed for High and Low risk for anyone interested in using it (NO GUARANTEES. DO YOUR OWN RESEARCH).
I will later consider incorporating the standard RSI for exit points. I am sure returns will increase based on current test runs :)
Returns look good based on the strategy result.
ProfitView Strategy TemplateHello traders,
This script took me a full week of coding/testing, sweat, and tears - and I’m too nice as I’m giving it for free to the community.
If you're tired of manual trading and looking for a solid strategy template to pair with your indicators, look no further.
This Pine Script v5 strategy template is engineered for maximum customization and risk management.
Best part?
This Pine Script v5 template facilitates the dynamic construction of ProfitView alerts, sparing users the time and effort of mastering the ProfitView syntax and manually creating alert commands.
This powerful tool gives much power to those who don't know how to code in Pinescript and want to automate their indicators' signals via the ProfitView Chrome extension.
IMPORTANT NOTES
ProfitView is a trading bot software that forwards TradingView alerts to your brokers (examples: Binance, Oanda, Coinbase, Bybit, etc.) for automating trading.
Many traders don't know how to dynamically create ProfitView-compatible alerts using the data from their TradingView scripts.
Traders using trading bots want their alerts to reflect the stop-loss/take-profit/trailing-stop/stop-loss to break options from your script and then create the orders accordingly.
This script showcases how to create ProfitView alerts dynamically.
TRADINGVIEW ALERTS
1) You'll have to create one alert per asset X timeframe = 1 chart.
Example: 1 alert for EUR/USD on the 5 minutes chart, 1 alert for EUR/USD on the 15-minute chart (assuming you want your bot to trade the EUR/USD on the 5 and 15-minute timeframes)
2) Select the Order fills and alert() function calls condition
3) For each alert, the alert message is pre-configured with the text below
{{strategy.order.alert_message}}
Please leave it as it is.
It's a TradingView native variable that will fetch the alert text messages built by the script.
4) ProfitView doesn't use webhook technology, so setting a webhook URL from the alerts notifications tab is unnecessary.
KEY FEATURES
I) Modular Indicator Connection
* plug your existing indicator into the template.
* Only two lines of code are needed for full compatibility.
Step 1: Create your connector
Adapt your indicator with only 2 lines of code and then connect it to this strategy template.
To do so:
1) Find in your indicator where the conditions print the long/buy and short/sell signals.
2) Create an additional plot as below
I'm giving an example with a Two moving averages cross.
Please replicate the same methodology for your indicator, whether a MACD , ZigZag, Pivots , higher-highs, lower-lows or whatever indicator with clear buy and sell conditions.
//@version=5
indicator("Supertrend", overlay = true, timeframe = "", timeframe_gaps = true)
atrPeriod = input.int(10, "ATR Length", minval = 1)
factor = input.float(3.0, "Factor", minval = 0.01, step = 0.01)
= ta.supertrend(factor, atrPeriod)
supertrend := barstate.isfirst ? na : supertrend
bodyMiddle = plot(barstate.isfirst ? na : (open + close) / 2, display = display.none)
upTrend = plot(direction < 0 ? supertrend : na, "Up Trend", color = color.green, style = plot.style_linebr)
downTrend = plot(direction < 0 ? na : supertrend, "Down Trend", color = color.red, style = plot.style_linebr)
fill(bodyMiddle, upTrend, color.new(color.green, 90), fillgaps = false)
fill(bodyMiddle, downTrend, color.new(color.red, 90), fillgaps = false)
buy = ta.crossunder(direction, 0)
sell = ta.crossunder(direction, 0)
//////// CONNECTOR SECTION ////////
Signal = buy ? 1 : sell ? -1 : 0
plot(Signal, title = "Signal", display = display.data_window)
//////// CONNECTOR SECTION ////////
Important Notes
🔥 The Strategy Template expects the value to be exactly 1 for the bullish signal and -1 for the bearish signal
Now, you can connect your indicator to the Strategy Template using the method below or that one.
Step 2: Connect the connector
1) Add your updated indicator to a TradingView chart
2) Add the Strategy Template as well to the SAME chart
3) Open the Strategy Template settings, and in the Data Source field, select your 🔌Connector🔌 (which comes from your indicator)
Note it doesn’t have to be named 🔌Connector🔌 - you can name it as you want - however, I recommend an explicit name you can easily remember.
From then, you should start seeing the signals and plenty of other stuff on your chart.
🔥 Note that whenever you update your indicator values, the strategy statistics and visuals on your chart will update in real-time
II) BOT Risk Management:
- Max Drawdown:
Mode: Select whether the max drawdown is calculated in percentage (%) or USD.
Value: If the max drawdown reaches this specified value, set a value to halt the bot.
- Max Consecutive Days:
Use Max Consecutive Days BOT Halt: Enable/Disable halting the bot if the max consecutive losing days value is reached.
- Max Consecutive Days: Set the maximum number of consecutive losing days allowed before halting the bot.
- Max Losing Streak:
Use Max Losing Streak: Enable/Disable a feature to prevent the bot from taking too many losses in a row.
- Max Losing Streak Length: Set the maximum length of a losing streak allowed.
Margin Call:
- Use Margin Call: Enable/Disable a feature to exit when a specified percentage away from a margin call to prevent it.
Margin Call (%): Set the percentage value to trigger this feature.
- Close BOT Total Loss:
Use Close BOT Total Loss: Enable/Disable a feature to close all trades and halt the bot if the total loss is reached.
- Total Loss ($): Set the total loss value in USD to trigger this feature.
Intraday BOT Risk Management:
- Intraday Losses:
Use Intraday Losses BOT Halt: Enable/Disable halting the bot on reaching specified intraday losses.
Mode: Select whether the intraday loss is calculated in percentage (%) or USD.
- Max Intraday Losses (%): Set the value for maximum intraday losses.
Limit Intraday Trades:
- Use Limit Intraday Trades: Enable/Disable a feature to limit the number of intraday trades.
- Max Intraday Trades: Set the maximum number of intraday trades allowed.
Restart Intraday EA:
- Use Restart Intraday EA: Enable/Disable a feature to restart the bot at the first bar of the next day if it has been stopped with an intraday risk management safeguard.
III) Order Types and Position Sizing
- Choose between market, limit, or stop orders.
- Set your position size directly in the template.
Please use the position size from the “Inputs” and not the “Properties” tab.
I know it's redundant. - the template needs this value from the "Inputs" tab to build the alerts, and the Backtester needs it from the "Properties" tab.
IV) Advanced Take-Profit and Stop-Loss Options
- Choose to set your SL/TP in either pips or percentages.
- Option for multiple take-profit levels and trailing stop losses.
- Move your stop loss to break even +/- offset in pips for “risk-free” trades.
V) Miscellaneous
Retry order openings if they fail.
Order Types:
Select and specify order type and price settings.
Position Size:
Define the type and size of positions.
Leverage:
Leverage settings, including margin type and hedge mode.
Session:
Limit trades to specific sessions.
Dates:
Limit trades to a specific date range.
Trades Direction:
Direction: Specify the market direction for opening positions.
VI) Notifications (Telegram/Discord/Email/IFTTT/Twilio/SMS)
Customize notifications sent to Telegram, Discord, Email, IFTTT, Twilio, and ProfitView Logger.
VII) Logger
The ProfitView commands are logged in the TradingView logger.
You'll find more information about it in this TradingView blog post .
WHY YOU MIGHT NEED THIS TEMPLATE
1) Transform your indicator into a ProfitView trading bot more easily than before
Connect your indicator to the template
Create your alerts
Set your EA settings
2) Save Time
Auto-generated alert messages for ProfitView.
I tested them all and checked with the support team what could/couldn’t be done.
3) Be in Control
Manage your trading risks with advanced features.
4) Customizable
Fits various trading styles and asset classes.
REQUIREMENTS
* Make sure you have your ProfitView account and do the settings correctly in your Chrome extension. If you don't know how to do it, read the documentation + ask for help in the ProfitView Discord support channel.
* If there is any issue with the template, ask me in the comments section - I’ll answer quickly.
BACKTEST RESULTS FROM THIS POST
1) I connected this strategy template to a dummy Supertrend script.
I could have selected any other indicator or concept for this script post.
I wanted to share an example of how you can quickly upgrade your strategy, making it compatible with ProfitView.
2) The backtest results aren't relevant for this educational script publication.
I used realistic backtesting data but didn't look too much into optimizing the results, as this isn't the point of why I'm publishing this script.
This strategy is a template to be connected to any indicator - the sky is the limit. :)
3) This template is made to take 1 trade per direction at any given time.
Pyramiding is set to 1 on TradingView.
The strategy default settings are:
* Initial Capital: 100000 USD
* Position Size: 1%
* Commission Percent: 0.075%
* Slippage: 1 tick
* No margin/leverage used
Best regards,
Dave
TradingView.To Strategy Template (with Dyanmic Alerts)Hello traders,
If you're tired of manual trading and looking for a solid strategy template to pair with your indicators, look no further.
This Pine Script v5 strategy template is engineered for maximum customization and risk management.
Best part?
This Pine Script v5 template facilitates the dynamic construction of TradingView.TO alerts, sparing users the time and effort of mastering the TradingView.TO syntax and manually create alert commands.
This powerful tool gives much power to those who don't know how to code in Pinescript and want to automate their indicators' signals via TradingView.TO bot.
IMPORTANT NOTES
TradingView.TO is a trading bot software that forwards TradingView alerts to your brokers (examples: Binance, Oanda, Coinbase, Bybit, Metatrader 4/5, ...) for automating trading.
Many traders don't know how to create TradingView.TO dynamically-compatible alerts using the data from their TradingView scripts.
Traders using trading bots want their alerts to reflect the stop-loss/take-profit/trailing-stop/stop-loss to break options from your script and then create the orders accordingly.
This script showcases how to create TradingView.TO alerts dynamically.
TRADINGVIEW ALERTS
1) You'll have to create one alert per asset X timeframe = 1 chart.
Example: 1 alert for BTC/USDT on the 5 minutes chart, 1 alert for BTC/USDT on the 15-minute chart (assuming you want your bot to trade the BTC/USDT on the 5 and 15-minute timeframes)
2) Select the Order fills and alert() function calls condition
3) For each alert, the alert message is pre-configured with the text below
{{strategy.order.alert_message}}
Please leave it as it is.
It's a TradingView native variable that will fetch the alert text messages built by the script.
4) TradingView.TO uses webhook technology - setting a webhook URL from the alerts notifications tab is required.
KEY FEATURES
I) Modular Indicator Connection
* plug your existing indicator into the template.
* Only two lines of code are needed for full compatibility.
Step 1: Create your connector
Adapt your indicator with only 2 lines of code and then connect it to this strategy template.
To do so:
1) Find in your indicator where the conditions print the long/buy and short/sell signals.
2) Create an additional plot as below
I'm giving an example with a Two moving averages cross.
Please replicate the same methodology for your indicator, whether a MACD , ZigZag, Pivots , higher-highs, lower-lows or whatever indicator with clear buy and sell conditions.
//@version=5
indicator("Supertrend", overlay = true, timeframe = "", timeframe_gaps = true)
atrPeriod = input.int(10, "ATR Length", minval = 1)
factor = input.float(3.0, "Factor", minval = 0.01, step = 0.01)
= ta.supertrend(factor, atrPeriod)
supertrend := barstate.isfirst ? na : supertrend
bodyMiddle = plot(barstate.isfirst ? na : (open + close) / 2, display = display.none)
upTrend = plot(direction < 0 ? supertrend : na, "Up Trend", color = color.green, style = plot.style_linebr)
downTrend = plot(direction < 0 ? na : supertrend, "Down Trend", color = color.red, style = plot.style_linebr)
fill(bodyMiddle, upTrend, color.new(color.green, 90), fillgaps = false)
fill(bodyMiddle, downTrend, color.new(color.red, 90), fillgaps = false)
buy = ta.crossunder(direction, 0)
sell = ta.crossunder(direction, 0)
//////// CONNECTOR SECTION ////////
Signal = buy ? 1 : sell ? -1 : 0
plot(Signal, title = "Signal", display = display.data_window)
//////// CONNECTOR SECTION ////////
Important Notes
🔥 The Strategy Template expects the value to be exactly 1 for the bullish signal and -1 for the bearish signal
Now, you can connect your indicator to the Strategy Template using the method below or that one.
Step 2: Connect the connector
1) Add your updated indicator to a TradingView chart
2) Add the Strategy Template as well to the SAME chart
3) Open the Strategy Template settings, and in the Data Source field, select your 🔌Connector🔌 (which comes from your indicator)
Note it doesn’t have to be named 🔌Connector🔌 - you can name it as you want - however, I recommend an explicit name you can easily remember.
From then, you should start seeing the signals and plenty of other stuff on your chart.
🔥 Note that whenever you update your indicator values, the strategy statistics and visuals on your chart will update in real-time
II) BOT Risk Management:
- Max Drawdown:
Mode: Select whether the max drawdown is calculated in percentage (%) or USD.
Value: If the max drawdown reaches this specified value, set a value to halt the bot.
- Max Consecutive Days:
Use Max Consecutive Days BOT Halt: Enable/Disable halting the bot if the max consecutive losing days value is reached.
- Max Consecutive Days: Set the maximum number of consecutive losing days allowed before halting the bot.
- Max Losing Streak:
Use Max Losing Streak: Enable/Disable a feature to prevent the bot from taking too many losses in a row.
- Max Losing Streak Length: Set the maximum length of a losing streak allowed.
Margin Call:
- Use Margin Call: Enable/Disable a feature to exit when a specified percentage away from a margin call to prevent it.
Margin Call (%): Set the percentage value to trigger this feature.
- Close BOT Total Loss:
Use Close BOT Total Loss: Enable/Disable a feature to close all trades and halt the bot if the total loss is reached.
- Total Loss ($): Set the total loss value in USD to trigger this feature.
Intraday BOT Risk Management:
- Intraday Losses:
Use Intraday Losses BOT Halt: Enable/Disable halting the bot on reaching specified intraday losses.
Mode: Select whether the intraday loss is calculated in percentage (%) or USD.
- Max Intraday Losses (%): Set the value for maximum intraday losses.
Limit Intraday Trades:
- Use Limit Intraday Trades: Enable/Disable a feature to limit the number of intraday trades.
- Max Intraday Trades: Set the maximum number of intraday trades allowed.
Restart Intraday EA:
III) Order Types and Position Sizing
- Choose between market or limit orders.
- Set your position size directly in the template.
Please use the position size from the “Inputs” and not the “Properties” tab.
I know it's redundant. - the template needs this value from the "Inputs" tab to build the alerts, and the Backtester needs it from the "Properties" tab.
IV) Advanced Take-Profit and Stop-Loss Options
- Choose to set your SL/TP in either USD or percentages.
- Option for multiple take-profit levels and trailing stop losses.
- Move your stop loss to break even +/- offset in USD for “risk-free” trades.
V) Miscellaneous:
Retry order openings if they fail.
Order Types:
Select and specify order type and price settings.
Position Size:
Define the type and size of positions.
Leverage:
Leverage settings, including margin type and hedge mode.
Session:
Limit trades to specific sessions.
Dates:
Limit trades to a specific date range.
Trades Direction:
Direction: Specify the market direction for opening positions.
VI) Logger
The TradingView.TO commands are logged in the TradingView logger.
You'll find more information about it in this TradingView blog post .
WHY YOU MIGHT NEED THIS TEMPLATE
1) Transform your indicator into a TradingView.TO trading bot more easily than before
Connect your indicator to the template
Create your alerts
Set your EA settings
2) Save Time
Auto-generated alert messages for TradingView.TO.
I tested them all and checked with the support team what could/couldn’t be done.
3) Be in Control
Manage your trading risks with advanced features.
4) Customizable
Fits various trading styles and asset classes.
REQUIREMENTS
* Make sure you have your TradingView.TO account
* If there is any issue with the template, ask me in the comments section - I’ll answer quickly.
BACKTEST RESULTS FROM THIS POST
1) I connected this strategy template to a dummy Supertrend script.
I could have selected any other indicator or concept for this script post.
I wanted to share an example of how you can quickly upgrade your strategy, making it compatible with TradingView.TO.
2) The backtest results aren't relevant for this educational script publication.
I used realistic backtesting data but didn't look too much into optimizing the results, as this isn't the point of why I'm publishing this script.
This strategy is a template to be connected to any indicator - the sky is the limit. :)
3) This template is made to take 1 trade per direction at any given time.
Pyramiding is set to 1 on TradingView.
The strategy default settings are:
* Initial Capital: 100000 USD
* Position Size: 1%
* Commission Percent: 0.075%
* Slippage: 1 tick
* No margin/leverage used
MACD-VWAP-BB Oscillator with DivergenceHow to Use the Indicator for Trading
Here’s how to interpret and use the indicator’s signals as a beginner:
Look for Buy Signals:
Green Triangle Up (“BUY”):
Appears when MACD, VWAP, and Bollinger Bands all signal a strong bullish trend.
The ribbon turns green, and the background fill is green.
Action: Consider buying the asset, as this is a strong signal the price may rise.
Example: If you see a green triangle on a 1-hour chart for BTC/USD, it suggests a potential upward move.
Green Circle (“Div Buy”):
Indicates a bullish divergence, where the price is dropping, but the indicator suggests the downtrend may weaken or reverse.
This is a weaker signal than the triangle but can be an early warning of a trend change.
Action: Watch closely or consider a smaller buy position, especially if followed by a triangle signal.
Look for Sell Signals:
Red Triangle Down (“SELL”):
Appears when all three indicators signal a strong bearish trend.
The ribbon turns red, and the background fill is red.
Action: Consider selling or shorting the asset, as the price may fall.
Example: A red triangle on a stock chart suggests it’s time to exit a long position or go short.
Red Circle (“Div Sell”):
Indicates a bearish divergence, where the price is rising, but the indicator suggests the uptrend may weaken or reverse.
Action: Be cautious with long positions or consider preparing to sell, especially if a triangle signal follows.
Check the Ribbon and Background:
Green Ribbon and Fill: Confirms a bullish trend. Feel more confident in buy signals.
Red Ribbon and Fill: Confirms a bearish trend. Feel more confident in sell signals.
The ribbon’s spread (how far apart the lines are) shows trend strength: wider = stronger trend, tighter = weaker trend.
Use Divergence Signals for Early Warnings:
Divergence signals (circles) often appear before triangle signals, hinting at potential reversals.
Example: A green circle (“Div Buy”) on a downtrending chart suggests the price might stop falling soon. Wait for a green triangle to confirm before acting.
Choose a Timeframe:
Short-term traders (day trading): Use shorter timeframes like 5-minute, 15-minute, or 1-hour charts.
Swing traders: Use 4-hour or daily charts for signals that last days or weeks.
Long-term investors: Use daily or weekly charts for bigger trends.
Example: On a 4-hour chart, a green triangle might signal a trend lasting hours to days.
Combine with Price Action:
Don’t rely on the indicator alone. Look at the candlesticks:
Are there support/resistance levels nearby?
Is the price near a key level (e.g., a moving average or trendline)?
Use the indicator to confirm what you see in the price chart.
Risk Management:
Set Stop-Losses: Place a stop-loss below recent lows for buys or above recent highs for sells to limit losses.
Position Sizing: Only risk a small portion of your account (e.g., 1-2%) per trade.
Wait for Confirmation: Triangle signals are stronger than divergence signals. Consider waiting for a triangle before entering a trade, especially as a beginner.
Example Trading Scenario
Let’s say you’re trading EUR/USD on a 1-hour chart:
You see a green circle (“Div Buy”) at the bottom of the indicator panel, and the price is near a support level (a price where it stopped falling before).
This suggests a potential reversal, but it’s not confirmed yet.
Action: Watch closely but don’t enter a trade yet.
A few candles later, a green triangle (“BUY”) appears, the ribbon turns green, and the background fill is green.
This confirms a strong bullish signal (MACD, VWAP, and Bollinger Bands all agree).
Action: Enter a buy trade, set a stop-loss below the recent low, and aim for a target near a resistance level or a 1:2 risk-reward ratio.
Later, you see a red circle (“Div Sell”) while the price is still rising.
This warns that the uptrend might weaken.
Action: Tighten your stop-loss or prepare to exit if a red triangle appears.
A red triangle (“SELL”) appears, with the ribbon and fill turning red.
Action: Exit the buy trade or consider a short position.
Tips for Beginners
Start with a Demo Account: Practice using the indicator on a TradingView paper trading account or a broker’s demo account to avoid risking real money.
Test on Different Assets: Try the indicator on stocks, forex, or crypto to see where it performs best.
Avoid Overtrading: Wait for clear triangle signals for stronger trades. Divergence signals (circles) are less reliable, so use them as warnings.
Learn Basic Chart Patterns: Combine the indicator with simple patterns like support/resistance or candlestick patterns (e.g., pin bars) for better results.
Adjust Settings Carefully: The default settings (e.g., MACD 12,26,9; ribbon 8,13,21,34) are balanced, but you can tweak them in the indicator settings to match your trading style.
Common Questions
What timeframe should I use?
It depends on your trading style. Day traders might use 5-minute or 1-hour charts; swing traders might use 4-hour or daily charts. Test different timeframes to find what suits you.
Are divergence signals reliable?
Divergence signals (green/red circles) are early warnings and less reliable than triangle signals. Use them to prepare for a trade but wait for triangles for confirmation.
Can I use this on any asset?
Yes! It works on stocks, forex, crypto, or commodities. Adjust settings like pivotLookback or smoothWavy for volatile assets like crypto.
What if I see conflicting signals?
If a green circle appears but no green triangle, the trend isn’t confirmed yet. Wait for alignment of all indicators (triangle signal) for stronger trades.
How to Customize (Optional)
If you want to tweak the indicator:
Open the indicator settings (double-click its name on the chart).
Adjust Pivot Lookback for Divergence (default 5) to make divergence signals more frequent (smaller number) or less frequent (larger number).
Change Signal Line Smoothing Period (default 9) for a smoother or wavier signal line.
Modify EMA Ribbon Periods (default 8,13,21,34) for a tighter or wider ribbon.
EMA 65 and 200 Strategy (Updated)//@version=5
strategy("EMA 65 and 200 Strategy (Updated)", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// Define EMAs
ema65 = ta.ema(close, 65)
ema200 = ta.ema(close, 200)
// Plot EMAs
plot(ema65, color=color.blue, linewidth=2, title="EMA 65")
plot(ema200, color=color.red, linewidth=2, title="EMA 200")
// Conditions for sell entry (Price touching EMA65 or EMA200 with a bearish trend)
sell_condition = (close < ema65 and close > ema65) or (close < ema200 and close > ema200)
sell_stop_loss = close + 20 // 20 points above the entry
sell_take_profit = close - 10 // 10 points below the entry
// Conditions for buy entry (Price touching EMA65 or EMA200 with a bullish trend)
buy_condition = (close > ema65 and close < ema65) or (close > ema200 and close < ema200)
buy_stop_loss = close - 20 // 20 points below the entry
buy_take_profit = close + 10 // 10 points above the entry
// Strategy execution: Buy and Sell orders
if (sell_condition)
strategy.entry("Sell", strategy.short, stop=sell_stop_loss, limit=sell_take_profit)
if (buy_condition)
strategy.entry("Buy", strategy.long, stop=buy_stop_loss, limit=buy_take_profit)
// Plot buy and sell signals
plotshape(series=sell_condition, location=location.abovebar, color=color.red, style=shape.labeldown, title="Sell Signal", text="SELL")
plotshape(series=buy_condition, location=location.belowbar, color=color.green, style=shape.labelup, title="Buy Signal", text="BUY")
// Draw stop loss and take profit levels for visualization
plot(sell_condition ? sell_stop_loss : na, color=color.red, style=plot.style_line, linewidth=1, title="Sell Stop Loss")
plot(sell_condition ? sell_take_profit : na, color=color.green, style=plot.style_line, linewidth=1, title="Sell Take Profit")
plot(buy_condition ? buy_stop_loss : na, color=color.red, style=plot.style_line, linewidth=1, title="Buy Stop Loss")
plot(buy_condition ? buy_take_profit : na, color=color.green, style=plot.style_line, linewidth=1, title="Buy Take Profit")